home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-05 | 880 b | 52 lines | [MATF/MATL] |
- function [fun,dfun,ifun,x0,m,C,Ax] = zemx2d2
- % Taylor series coefficient lists for several functions.
- % Pm(x) = c(1) + c(2)x + c(2)x^2 + ... + c(m+1)x^m
- % fun is the function, output.
- % dfun is the derivative, output.
- % ifun is the integral, output.
- % x0 is the point of expansion, output.
- % m is the degree of the polynomial, output.
- % C is the coefficient list, output.
- % Ax contains three asis vectors plotting, output.
- x0 = 0;
- m = 24;
- a = -3;
- b = 3;
- ymin = -0.1;
- ymax = 1.05;
- ymin1 = -10;
- ymax1 = 10;
- ymin2 = -1.5;
- ymax2 = 1.5;
- Ax(1,:) = [a b ymin ymax];
- Ax(2,:) = [a b ymin1 ymax1];
- Ax(3,:) = [a b ymin2 ymax2];
- fun = 'exp(-x.^2/2)';
- dfun = '-x./exp(-x.^2/2)';
- ifun = 'sqrt(pi/2).*erf(x./sqrt(2))';
- C = [1/1961990553600,
- 0,
- -1/81749606400,
- 0,
- 1/3715891200,
- 0,
- -1/185794560,
- 0,
- 1/10321920,
- 0,
- -1/645120,
- 0,
- 1/46080,
- 0,
- -1/3840,
- 0,
- 1/384,
- 0,
- -1/48,
- 0,
- 1/8,
- 0,
- -1/2,
- 0,
- 1];
-